package dfbz.demo.demo03;

public class Body { //外部类
    private String name="外部类的成员变量"; //外部类的
    public class Heart{  //内部类
        private String name="内部类成员变量"; //内部类成员变量
        public void jump(){ //内部类成员方法
         String name="局部变量";
            System.out.println(name);
            System.out.println(this.name);
            System.out.println(Body.this.name);
            System.out.println("心脏在跳动");
        }
    }
    public void eat(){
        System.out.println("吃饭......");
        Heart heart=new Heart();
        heart.jump();
    }
}
